function r = getRectFromUser(im);


%% draw the image, ask user to draw the rectangle.
clf;
pause(0.1);
imagesc(im);
set(gcf,'Pointer','crosshair');
title('draw rectangle');
r = getrect;

%expand the rectangle size by 20%
raSize = r(4);
rbSize = r(3);
raMin = r(2)-raSize.*.2;
raSize = raSize .* 1.4;

rbMin = r(1)-rbSize.*.2;
rbSize = rbSize.*1.4;

r = [rbMin raMin rbSize raSize];
r = round(r);

